package org.example.admin.service.impl;

import org.example.admin.entity.Comment;
import org.example.admin.mapper.CommentMapper;
import org.example.admin.service.CommentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

    @Resource
    private CommentMapper commentMapper;

    public List<Comment> selectCommentBystoreId(int storeId){return commentMapper.selectCommentBystoreId(storeId);}

    public int deleteComment(int commentid){return commentMapper.deleteComment(commentid);}

    public int updateContent(String content, int commentid){return commentMapper.updateContent(content, commentid);}

    public int insertComment(String content, int storeid, int userid){return commentMapper.insertComment(content, storeid, userid);}

    public Comment selectCommentById(int commentid){return commentMapper.selectCommentById(commentid);}

    public List<Comment> selectCommentAll(){return commentMapper.selectCommentAll();}
}
